class BaseError(Exception):
    def __init__(self, info: str):
        self.info = info

    def __str__(self):
        return self.info

    def __repr__(self):
        return self.info


class PreparationError(BaseError):
    """预加载异常"""


class FakeExchangeError(BaseError):
    """虚拟交易所异常"""


class TradeError(BaseError):
    """交易异常"""


class StrategyError(BaseError):
    """策略异常"""


class DrawError(BaseError):
    """回测数据处理异常"""


class DataHandlerError(BaseError):
    """数据中心错误"""


class RealExchangeError(BaseError):
    """真实交易所异常"""


class WesError(RealExchangeError):
    """"""
